Error correcting method and device

ABSTRACT

In an error correcting method for correcting three or fewer errors or six or fewer erasures, syndromes S 0  to S 5  from a received codeword are calculated. If the calculated syndromes S 0  to S 5  are all zeros, it is determined that there is no error. If syndromes S 0 , S 1 , and S 2  are zeros and at least one of the calculated syndromes S 3 , S 4 , and S 5  is not zero, it is determined that error correction is impossible. Subsequently, if exactly two of syndromes S 0 , S 1 , and S 2  are zeros, coefficients σ1, σ2, and σ3 of an error-location polynomial are differently calculated depending on which of syndromes S 0 , S 1 , and S 2  is not zero. The calculated coefficients are used to determine error locations, an error type, the possibility of error correction, and if error correction is possible error values. If more or fewer than two of syndromes S 0 , S 1 , and S 2  are not zero, an error type and the possibility of error correction are determined using the syndromes S 0  to S 4  and the coefficients of the error location polynomial calculated depending on whether first and second syndrome equations obtained using syndromes S 0  to S 3  which are calculated according to the values of syndrome S 0  and S 1  are zeros, and error locations and values are calculated.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an error correcting method and device,and more particularly, to an error correcting method and device forrapidly and stably correcting a triple-error/six-erasure.

2. Description of the Related Arts

U.S. Pat. No. 4,142,174 issued Feb. 27, 1979 to Chen et. al. andentitled HIGH SPEED DECODING OF REED-SOLOMON CODES, describes how toobtain the coefficients of an error location polynomial equation whenlocating bit errors in codeword having a double-error, triple-error, orsix-error. To find the coefficients, simultaneous equations can besolved using a classical method, such as, the Berlekamp-Messay method ora Newton identity. For example, a double-error has an error locationpolynomial σ(x) given in Equation 1.

    σ(x)=x.sup.2 +σ.sub.1 ·x+θ.sub.2 Equation 1

The coefficients σ₁ and σ₂ of error location polynomial σ(x) aredetermined from syndromes S₀ to S₃ obtained from an error correctioncode. In particular, simultaneous Equations 2, which containcoefficients σ₁ and σ₂ and syndromes S₁ to S₃, can be solved forcoefficients σ₁, and σ₂ using a determinant of order 2 derived from aNewton identity. ##EQU1##

Triple-error correction is more complex that double-error correction. Anerror location polynomial σ(x) for triple-error correction is given as

    σ(x)=x.sup.3 +σ.sub.1 ·x.sup.2 +x.sub.2 ·x+σ.sub.3                                 Equation 3

or

    σ(x)=(x+σ.sup.i)·(x+σ.sup.j)•(x+σ.sup.k)=x.sup.3 +σ.sub.1 x.sup.2 +σ.sub.2 x+σ.sub.3 Equation 4

The coefficients σ₁, σ₂ and σ₃ of the error location polynomial σ(x) inEquation 3 are derivable from matrix Equation 5 and syndromes S₀ to S₅from a received codeword. ##EQU2## Equation 5 has solutions shown inEquations 6. ##EQU3##

A known technology can determine the number of errors. For example, thenumber of errors can be obtained using methods disclosed in Korea PatentPublications No. 94-4980, 95-34202, and 96-11689. However, known methodsfor solving an error number decision equation can require too muchoperation time. For example, Korea Patent Publication No. 96-11689 usesthe values of the coefficients σ₁ and σ₂ obtained for the double-errorcorrection to reduce the number of operations required when obtainingthe values of the coefficients σ₁, σ₂, and σ₃ for triple-errorcorrection and uses the values of the coefficients σ₁, σ₂, and σ₃ whenobtaining the values of coefficients σ₁, σ₂, σ₃, and σ₄ for 4-errorcorrection. However, this method still requires complicated operationsto obtain the coefficients σ₁, and σ₂ of a location polynomial.

In a compact disk player (CDP) or a digital audio tape (DAT) whichsimply error-correction-encodes and decodes source digital audio data,high quality audio data can be provided to a user by carrying out theerror correction of only a double-error correction/4- or 6-erasurecorrection and then interpolating uncorrected data. However, in adigital compact cassette (DCC), a mini disk (MD), or a video compactdisk (VCD), which employs an audio/video data compression algorithm,compressed data is frequently frequency domain data rather than timedomain data, and an uncorrected error significantly degrades the qualityof decoded audio or video. Thus, the DCC, MD, and VCD need better errorcorrection capabilities and typically perform a triple-error correctionto decrease uncorrected errors.

On the other hand, an error correction decoding in a conventional CD-ROMor DVD-ROM system may reduce a transmission speed of a reproduced datato a host, which will be described with reference to FIG. 1. FIG. 1 is asimplified block diagram of the CD-ROM or DVD-ROM system. The system hasa disk 10, a compact disk player-digital signal processor (CDP-DSP) orDVD decoder 12, a CD-ROM decoder or a DVD-ROM host interface (I/F) 14,and an audio/video (A/V) decoder 16. Also, CD-ROM decoder or a DVD-ROMhost I/F 14 is interfaced with an external host 18. When CDP-DSP or DVDdecoder 12 of FIG. 1 transmits data read from disk 10 to CD-ROM decoderor the DVD-ROM host I/F 14, or A/V decoder 16, data buffering or datatransmission by CDP-DSP or DVD decoder 12 is performed at high speed.However, the data or error correction decoding in CD-ROM decoder or theDVD-ROM host I/F 14 requires time and may reduce the data transmissionspeed. Accordingly, fast error correction decoding methods and decodersare desired.

SUMMARY OF THE INVENTION

An object of the present invention is to provide an error correctingmethod for more rapidly and stably correcting errors by efficientlyobtaining the coefficients of an error location polynomial from syndromevalues.

Another object of the present invention is to provide an errorcorrecting device for performing the above error correcting method.

To achieve one of the objects above, there is provided an errorcorrecting method for correcting three or fewer errors or six or fewererasures. The method first determines syndromes S₀ to S₅ from a receivedcodeword and then determines whether the calculated syndromes S₀ to S₅are all zeros. If the calculated syndromes S₀ to S₅ are all zeros, thereis no error. If syndromes S₀ to S₅ are not all zeros, it is determinedwhether syndromes S₀, S₁, and S₂ are zeros and at least one of syndromesS₃, S₄, and S₅ is not zero. If syndromes S₀, S₁, and S₂ are zeros and atleast one of the calculated syndromes S₃, S₄, and S₅ is not zero, errorcorrection is impossible. Otherwise, coefficients σ1, σ2, and σ3 of anerror-location polynomial are calculated using different methodsdepending on whether and which of the three syndromes S₀, S₁, and S₂ arezeros. If all of the calculated syndromes S₀, S₁, and S₂ are not zerosor the calculated syndromes S₃, S₄, and S₅ are all zeros, the methoddetermines an error type and the possibility of error correctiondepending on whether error locations calculated from the calculatedcoefficients are in a codeword. An error type and the possibility oferror correction are determined using the syndromes S₀ to S₄ and thecoefficients of the error location polynomial calculated depending onwhether first and second syndrome equations obtained using syndromes S₀to S₃ which are calculated according to the values of syndromes S₀ andS₁ are zeros if two of the syndromes S₀ to S₂ are not zeros, and errorlocations and values are calculated.

To achieve another of the objects above, an error correcting device forcorrecting three or fewer errors or six or fewer erasures comprisesmeans for storing a received codeword; means for receiving the receivedcodeword stored in the received codeword storing means and generatingsyndromes S₀ to S₅ ; operating means for calculating coefficients σ1,σ2, and σ3 of an error-location polynomial as ##EQU4## in response to afirst control signal,

calculating the coefficients σ1, σ2, and σ3 of the error-locationpolynomial as ##EQU5## in response to a second control signal,

calculating the coefficients σ1, σ2, and σ3 of the error-locationpolynomial as ##EQU6## in response to a third control signal,

calculating the first and second syndrome equations A and B as

    A=S.sub.2 +σ·S.sub.1

    B=S.sub.3 +σ·S.sub.2 (where σ is S.sub.1 /S.sub.0)

in response to a fourth control signal,

calculating coefficients σ1' and σ2' of the error-location polynomial,and D as

    σ1'=(S.sub.1 ·S.sub.2 +S.sub.0 ·S.sub.3)/Δ(whereΔ=S.sub.1.sup.2 +S.sub.0 ·S.sub.2 ≠0)

    σ2'=(S.sub.1 ·S.sub.3 +S.sub.2.sup.2)/Δ

    D=S.sub.4 +σ1·S.sub.3 +σ2·S.sub.2

in response to a fifth control signal, calculating error locations andvalues from σ1' and σ2' in response to a sixth control signal,calculating coefficients Σ1, Σ2, and Σ3 of an error-location polynomialas

    Σ1=(S.sub.3 ·σ2'+S.sub.4 ·σ1'+S.sub.5)/D

    Σ2=(S.sub.1 ·S.sub.3 +S.sub.0 ·S.sub.4)/Δ+Σ1·σ1'

    Σ3=(S.sub.1 ·S.sub.4 +S.sub.2 ·S.sub.3)/Δ+ρ1·σ2'

in response to a seventh control signal, and calculating error locationsand values from Σ1, Σ2, and ρ3; operation controlling means forgenerating the first control signal if both syndrome S₁ and syndrome S₂are zeros and syndrome S₀ is not zero, the second control signal if bothsyndrome S₀ and syndrome S₂ are zeros and syndrome S₁ is not zero, thethird control signal if both syndrome S₀ and syndrome S₁ are zeros andsyndrome S₂ is not zero, the fourth control signal if two of thesyndromes S₀, S₁, and S₂ are not zeros and if syndrome S₀ is not zero orsyndrome S₁ is zero, the fifth control signal if both A and B are notzero, the sixth control signal if D is zero, and a seventh controlsignal if D is not zero; controlling means for determining that no erroris generated if all syndromes S₀ to S₅ are zeros, that error correctionis impossible if all of the syndromes S₀, S₁, and S₂ are zeros and allof the syndromes S₃, S₄, and S₅ are not zeros, that three errors aregenerated if the error locations obtained from σ1, σ2, and σ3 are in acodeword, that error correction is impossible if they are not in thecodeword, that an error is generated if both A and B are zeros, that twoerrors are generated if D is zero, and that three errors are generatedif D is not zero; and means for performing single-error correction,double-error correction, or triple-error correction according to thedetermination result of the determination controlling means.

BRIEF DESCRIPTION OF THE DRAWINGS

The above objects and advantages of the present invention will becomemore apparent by describing preferred embodiments thereof with referenceto the attached drawings in which:

FIG. 1 is a block diagram of a conventional CD-ROM or DVD-ROM system;

FIG. 2 is a flowchart outlining an error correcting method according toan embodiment of the present invention;

FIG. 3 is a detailed flowchart outlining step 40 of FIG. 2;

FIG. 4 is a detailed flowchart outlining step 42 of FIG. 2; and

FIG. 5 is a block diagram of an error correcting device according to thepresent invention.

DETAILED DESCRIPTION OF THE INVENTION

Referring to FIG. 2, an error correction process includes a step 30 forcalculating syndromes and steps 32 to 42 for determining from thecalculated syndromes, an error type and the possibility of errorcorrection.

For the triple-error correction/6-erasure correction Reed Solomon (RS)code, six syndromes S₀, S₁, S₂, S₃, S₄, and S₅ are calculated from areceived codeword R(x) as in the following Equation 7. Here, an erasureindicates a type of error whose location is known but whose value isunknown.

    S.sub.0 =e.sub.i +e.sub.j +e.sub.k +e.sub.i +e.sub.m +e.sub.n

    S.sub.1 =e.sub.i α.sup.i +e.sub.j α.sup.j +e.sub.k α.sup.k +e.sub.l α.sup.l +e.sub.m α.sup.m +e.sub.n α.sup.n

    S.sub.2 =e.sub.i α.sup.2i +e.sub.j α.sup.2j +e.sub.k α.sup.2k +e.sub.l α.sup.2l +e.sub.m α.sup.2m e.sub.n α.sup.2n

    S.sub.3 =e.sub.i α.sup.3i +e.sub.j α.sup.3j +e.sub.k α.sup.3k +e.sub.l α.sup.3l +e.sub.m α.sup.3m +e.sub.n α.sup.3n                                            Equations 7

    S.sub.4 =e.sub.i α.sup.4i 'e.sub.j α.sup.4j 'e.sub.k α.sup.4k +e.sub.l α.sup.4l +e.sub.m α.sup.4m +e.sub.nl α.sup.4n

    S.sub.5 =e.sub.i α.sup.5i +e.sub.j α.sup.5j +e.sub.k α.sup.5k +e.sub.l α.sup.5l +e.sub.m α.sup.5m +e.sub.n α.sup.5n

Step 32 determines whether all of the syndromes S₀ to S₅ are zeros. Ifall of the syndromes S₀ to S₅ are zeros, the process branches to step34, and there is no error. If all of syndromes S₀ to S₅ are not zeros,the process branches from step 32 to step 36.

Step 36 determines whether syndromes S₀, S₁, and S₂ are all zeros, andat least one of syndromes S₃, S₄, and S₅ is not zero. If syndromes S₀,S₁, and S₂ are all zeros, and at least one of syndromes S₃, S₄, and S₅is not zero, error correction is impossible, and the process branches tostep 38. That is, more than three errors are generated, and the receivederror correction code is insufficient for correcting all of the errors.However, if one or more syndromes S₀, S₁, and S₂ is not zero, orsyndromes S₃, S₄, and S₅ are all zeros, the condition evaluated in step36 is not satisfied, and the process branches to step 40. In step 40,the coefficients of an error-location polynomial are calculateddifferently, depending on whether two of the syndromes S₀, S₁, and S₂are zeros or not. Step 40 also determines error locations from thedifferently calculated error coefficients, an error type and thepossibility of error correction from a range of error locations, anderror values.

FIG. 3 is a flowchart of step 40 of FIG. 2 according to an embodiment ofthe invention. Step 40 of FIG. 3 includes steps 60, 64, and 68 fordetermining whether and which two of syndromes S₀, S₁, and S₂ are zeros,steps 62, 66, and 70 for calculating coefficients σ₁, σ₂, and σ₃ of theerror location polynomial for each case in which only one of syndromesS₀, S₁, and S₂ are non-zero, and steps 72, 74, 76, 78, and 80 fordetermining an error type according to the number of generated errors,the possibility of error correction, and if possible the error values.

If the condition evaluated in step 36 is not satisfied, that is, if allof the syndromes S₀, S₁, and S₂ are not zeros, or syndromes S₃, S₄, andS₅ are all zeros, step 60 determined whether syndromes S₁ and S₂ arezeros and syndrome S₀ is not zero. If syndrome S₁ and syndrome S₂ arezeros and syndrome S₀ is not zero, step 62 calculates the coefficientsσ₁, σ₂, and σ₃ of the error location polynomial using Equations 8.##EQU7## However, if both syndromes S₁ and S₂ are not zeros or syndromeS₀ is zero, the process branches from step 60 to step 64 and determineswhether syndromes S₀ and S₂ are zeros and syndrome S₁ is not zero. Ifsyndromes S₀ and S₂ are zeros and syndrome S₁ is not zero, step 66calculates coefficients σ₁, σ₂, and σ₃ of the error location polynomialusing Equations 9. ##EQU8## However, if syndromes S₀ and S₂ are notzeros or syndrome S₁ is zero, the process branches from step 64 to step68 and determines whether syndromes S₀ and S₁ are zeros and syndrome S₂is not zero. If both syndromes S₀ and S₁ are zeros and syndrome S₂ isnot zero, step 70 calculates coefficients σ₁, σ₂, and σ₃ of an errorlocation polynomial using Equations 10. ##EQU9##

If two of syndromes S₀, S₁, and S₂ are zeros and the other is not zero,step 62, 66, or 70 calculates coefficients σ₁, σ₂, and σ₃. The processthen proceeds from step 62, 66, or 70 under the assumption of step 72,that there are three errors. Under this assumption, step 74 calculateserror locations αi, αj, and αk, using the error location polynomial andthe coefficients calculated in steps 62, 66, or 70. Any desired methodcan be used for calculating the error locations. An exemplary method isdisclosed in Korea Patent Publication No. 94-10545.

Korea Patent Publication No. 92-18409 discloses a triple-errorcorrection method that applies the following concept to anerror-location polynomial. In particular, a polynomial of the thirddegree such as Equation 11 can be converted to the form of Equation 12.

    f(x)=x.sup.3 +cx.sup.2 +bx+a=0                             Equation 11

    f(Z)=Z.sup.3 +Z+θ=0                                  Equation 12

where θ is a constant.

For example, replacing x with (mZ+n) changes Equation 11 to Equation 13.

    (mZ+n).sup.3 +c(mZ+n).sup.2 +b(mZ+n)+a=0                   Equation 13

Expanding and then collecting terms of Equation 13 provides Equation 14which becomes Equation 15.

    (m.sup.3 Z.sup.3 +3m.sup.2 Z.sup.2 n+mZn.sup.2 +n.sup.3)+c(m.sup.2 Z.sup.2 +2mZn+n.sup.2)+b(mZ+n)+a=0                                Equation 14

    Z.sup.3 (m.sup.3)+Z.sup.2 (3m.sup.2 n+cm.sup.2)+Z(3mn.sup.2 +2cmn+bm)+(n.sup.3 +cn.sup.2 +bn+a)=0                     Equation 15

Dividing Equation 15 by m³ makes the coefficient of the highestdegree-term Z³ equal to 1 and provides Equation 16. ##EQU10##

If variables m and n satisfy the conditions of Equations 17, Equation 16simplifies to the form of Equation 12. ##EQU11##

Equations 17 are equivalent to Equations 18 by operating the root of apolynomial in finite field of Galois field GF(q). ##EQU12##

Therefore, m and n can be expressed with respect to a, b, and c as##EQU13## and θ of Equation 12 is expressed as ##EQU14##

The above relationships for polynomials of order 3 can be applied toEquation 3, where coefficients σ₁, σ₂, and σ₃ are respectively equal tocoefficients c, b, and a.

Korea Patent Application No. 92-18409 and the following describe how touse the above relationships to determine the error locations, the numberof errors, and the error values. First, the roots Z₁, Z₂, and Z₃ ofEquation 12 for all possible θ values are obtained and stored in amemory at addresses having a functional relationship to values θ. In anexemplary embodiment, roots Z₁, Z₂, and Z₃ are stored in a ROM table.Equation 12 is a conversion of Equation 3 which is a triple-errorlocation polynomial. From syndromes S₁ to S₅ calculated in step 30, thenumber of errors is obtained by constructing from the calculatedsyndromes a matrix M having the maximum dimension such that det[M]≠0.For triple-error correction, the number of errors is obtained bydetermining det[M]≠0 in a 3×3 matrix M, which is expressed as ##EQU15##

Coefficients σ₁, σ₂, and σ₃ of an error location polynomial are knownfrom 62, 66, or 70. From coefficients σ₁, σ₂, and σ₃, the values ofconstants k₁ and k₂ are obtained according to Equations 22 and 23respectively, and then the value of θ is obtained according to Equation24.

    k.sub.1 =σ.sub.1.sup.2 +σ.sub.2                Equation 22

    k.sub.2 =σ.sub.1 σ.sub.2 +σ.sub.3        Equation 23 ##EQU16## Then, an address corresponding to value θ obtained from Equation 24, and the roots Z.sub.1, Z.sub.2, and Z.sub.3 of Equation 12 are read from that address in the look-up table in memory. Roots Z.sub.1, Z.sub.2, and Z.sub.3 are converted into three roots α.sup.1, α.sup.2, and α.sup.3 of error location polynomial of Equation 3 using Equation 25. ##EQU17##

After step 74, step 76 determines whether the error locations are in thecodeword. That is, step 76 determines whether α⁰ ≦α^(i), α^(j), α^(k)≦α^(n-1) (n indicates a codeword length). If the error locations are inthe codeword, the assumption of step 72, that three errors aregenerated, is confirmed, and step 78 calculates error values using ageneral method, for example, the method disclosed in Korea PatentPublication No. 94-10545. However, if the error locations are not in thecodeword or any of the conditions of α^(i) =α^(j), α^(j) =α^(k), orα^(k) =α^(i) is satisfied, it is determined that error correction isimpossible in step 80. That is, more than three errors are generated,and the errors cannot be corrected using available information.Otherwise step 78 determines three error values e₁, e₂, and e₃. An errorvalue e_(j) is calculated by ##EQU18##

Here, error values for three error locations α¹, α², and α³ are e₁, e₂,and e₃, and an error estimating polynomial Ω(x) is given as

    Ω(x)=σ.sub.3 +(σ.sub.3 S.sub.0 +σ.sub.2)x+(σ.sub.3 S.sub.1 +σ.sub.2 S.sub.0 +σ.sub.1)x.sup.2 +(σ.sub.3 S.sub.2 +σ.sub.2 S.sub.1 +σ.sub.1 S.sub.0 +1)x.sup.3                         Equation 27

Step 40 handles the cases where exactly two out of the three syndromesS₀, S₁, and S₂ are zero. In this case, the error correction process iscompleted and ends in step 40. If it is not the case that exactly twoout of the three syndromes S₀, S₁, and S₂ are zeros, the errorcorrection process branches from step 40 (i.e., from step 68 in FIG. 3)to step 42. FIG. 4 is a flowchart of an embodiment of step 42. In FIG.4, step 42 includes steps 90, 91, and 92 for obtaining syndromeequations A and B according to the values of syndromes S₀ and S₁, andsteps 94 to 118 for differently obtaining the coefficients of the errorlocation polynomial depending on whether syndrome equations A and B arezeros or not, and determining an error type and the possibility of errorcorrection using coefficients σ₁, σ₂, and σ₃ and syndromes S₀ to S₄.

If conditions evaluated in steps 60, 64, and 68 are not satisfied, step90 determines whether syndrome S₀ is zero and syndrome S₁ is not zero.If syndrome S₀ is not zero or syndrome S₁ is zero, step 91 determineswhether syndrome S₀ is not zero. If syndromes S₀ and S₁ are zeros instep 91, error correction is impossible, and the process branches fromstep 91 two step 118. If syndrome S₀ is not zero, step 92 calculatesfirst and second syndrome equations A and B of Equations 28. ##EQU19##where σ is S₁ /S₀.

After step 92, step 94 determines whether both of the calculatedsyndrome equations A and B are not zero. If either A or B is zero, thatis, the condition evaluated in step 94 is not satisfied, step 96determines whether both A and B are zeros. If both A and B are zeros,there is only one error, and the process branches from step 96 to step98 where an error location and an error value are determined as σ (i.e.,S₁ /S₂) and syndrome S₀, respectively. However,

if only one of syndrome equations A and B is zero in step 96, errorcorrection is impossible, and the process branches from step 96 to step118.

If both A and B are not zero or syndrome S₀ is zero and syndrome S₁ isnot zero, two or more errors are generated, and the process branchesfrom step 94 or 90 to step 100. Step 100 calculates coefficients σ1' andσ2' of an error location polynomial and a variable D according toEquations 29. ##EQU20##

After step 100, step 102 determines whether variable D is zero todetermine an error type, that is, the number of errors. If variable D iszero, the process branches to step 104 for handling of two errors, andstep 106 determines error locations and error values for the two errorsusing a general method. If variable D is not zero, the process branchesfrom step 102 to step 108 and assumes three errors. To confirm thatthere are three errors, step 110 calculates the coefficients Σ1, Σ2, andΣ3 of an error location polynomial using Equation 30. ##EQU21##

After step 110, step 112 calculates error locations from thecoefficients Σ1, Σ2, and Σ3 using a general method, especially, theaforementioned method disclosed in Korea Patent Publication No.94-10545. Step 114 determines whether the calculated error locations arein a codeword. If they are not, error correction is impossible, and theprocess branches from step 114 to step 118. However, if they are, thereare three errors, and their values are calculated in step 116 using ageneral method such as those well known in the art.

FIG. 5 is a block diagram of an error correcting device in accordancewith an embodiment of the present invention. In FIG. 5, the errorcorrecting device has a received codeword storing unit 140, a syndromegenerator 142, an internal operation memory 144, an operation unit 146,an operation controller 148, a determination controller 150, and anerror correcting unit 160. Error correcting unit 160 includes an errorlocation calculating ROM table 154 for double-error correction, an errorlocation calculating ROM table 156 for triple-error correction, acorrected codeword storage 158, and an adder 152. Each unit 140 to 158of FIG. 5 is implemented as special purpose circuits for performing thefunctions described below. Alternatively, the error correcting device ofFIG. 5 could be implemented in a general purpose computer in whichreceived codeword storing unit 140, internal operation memory 144, ROMtables 154 and 156, and corrected codeword storage 158 are portions ofmemory and syndrome generator 142, operation unit 146, operationcontroller 148, determination controller 150, and adder 152 areimplemented in software or firmware.

Received codeword storing unit 140 of FIG. 5 latches and stores acodeword received from a source medium (not shown) or other errorcorrecting devices (not shown) via an input terminal IN. Syndromegenerator 142 receives the codeword latched from received codewordstoring unit 140 and outputs generated syndromes S₀ to S₅ to internaloperation memory 144. Internal operation memory 144 temporarily storesthe syndromes from syndrome generator 142 and interim operated valuesgenerated during operations in operation unit 146.

Operation controller 148 receives the syndromes stored in internaloperation memory 144 and generates a first control signal when bothsyndromes S₁ and S₂ are zeros and syndrome S₀ is not zero, a secondcontrol signal when both syndromes S₀ and S₂ are zeros and syndrome S₁is not zero, a third control signal when both syndromes S₀ and S₁ arezeros and syndrome S₂ is not zero, a fourth control signal when two ofthe syndromes S₀, S₁, and S₂ are not zeros and syndrome S₀ is not zeroor syndrome S₁ is zero, a fifth control signal when both syndromeequations A and B are not zero, a sixth control signal when value D iszero, and a seventh control signal when value D is not zero. Operationcontroller 148 outputs the control signals to operation unit 146.

Operation unit 146 uses the syndromes in internal operation memory 144in determining coefficients σ1, σ2, and σ3. In particular, operationunit 146 determines coefficients σ1, σ2, and σ3 according to Equations 8in response to the first control signal from operation controller 148,according to Equations 9 in response to the second control signal, andaccording to Equations 10 in response to the third control signal.Operation unit 146 also determines syndrome equations A and B fromEquations 28 in response to the fourth control signal, and values σ1',σ2', and D according to Equations 29 in response to the fifth controlsignal. In addition, operation unit 146 calculates an error location andan error value from σ1' and σ2' in response to the sixth control signal,coefficients Σ1, Σ2, and ρ3 of an error location polynomial as inEquation 30 in response to the seventh control signal, and an errorlocation and an error value from the coefficients Σ1, Σ2, and Σ3. Thefinal operated values calculated in operation unit 146 are temporarilystored in the internal operation memory 144.

The exemplary operations of operation controller 148 and operation unit146 are described. Operation controller 148 outputs the first controlsignal to operation unit 146 if syndromes S₁ and S₂ received frominternal operation memory 144 are zeros and syndrome S₀ is not zero.Operation unit 146 calculates σ1, σ2, and σ3 as in Equations 8 byiteratively operating in response to the first control signal. Here,operation unit 146 has a numerical logic operator (not shown) and anerror correction code (ECC) controller. The ECC controller performsdivisions using inverse circuits and calculates coefficients byiteratively outputting the results to the numerical logic operator.

Determination controller 150 of FIG. 5 determines that there is no errorif the syndromes S₀ to S₅ are all zeros, controls received codewordstoring unit 140, and outputs data to adder 152. On the other hand, ifsyndromes S₀, S₁, and S₂ are all zeros and syndromes S₃, S₄, and S₅ arenot all zeros, determination controller 150 determines that errorcorrection is impossible, and outputs via an output terminal OUT2 amessage indicating that error cannot be corrected.

Determination controller 150 determines whether the error locationsobtained from σ1, σ2, and σ3 in operation unit 146 are all in a codewordand determines that three errors are generated if they are. On the otherhand, if they are not, it outputs a corresponding signal and message toerror correcting unit 160 and an output terminal OUT2 upon determiningthat error correction is impossible.

Meanwhile, if syndrome S₀ is not zero or syndrome S₁ is zero,determination controller 150 reads values A and B from internaloperation memory 144 and directs error correcting unit 160 to perform acorresponding error correction upon determining that an error isgenerated, if both A and B are zeros. However, if both A and B are notzero, determination controller 150 determines whether D is zero.Determination controller 150 outputs corresponding control signals toerror correcting unit 160 upon determining that there are two errors ifD is zero or that there are three errors if D is not zero.

Error location calculating ROM table 154 for double-error correction inerror correcting unit 160 receives the difference between exponents fortwo error locations and outputs a pattern corresponding to the receiveddifference between the exponents. Similarly, error location calculatingROM table 156 for triple-error correction receives the differences amongexponents for three error locations and outputs a pattern correspondingto the received differences among exponents.

Adder 152 adds the pattern output from the error location calculatingROM table for double-error or triple-error correction 154 or 156 to dataoutput from received codeword storing unit 140 and outputs the addeddata to corrected codeword storage 158 as error-corrected data.Corrected codeword storage 158 outputs the stored error-corrected datavia the output terminal OUT1 under the control of determinationcontroller 150.

As described above, error correcting methods and devices in accordancewith embodiments of the invention remarkably reduce an operation time ascompared with a conventional coefficient calculating method, since thecoefficients of an error location polynomial are obtained by analyzingsyndrome values. They also increase an error correction rate, and thusrapidly and stably correct errors since the number of errors aredetermined in advance and it is determined whether error correction ispossible as compared with error number decision equations disclosed inKorea Patent Publication Nos. 94-4980, 94-10545, and 95-34202.

What is claimed is:
 1. An error correcting method, comprising the stepsof:(a) calculating syndromes S₀ to S₅ from a received codeword from thedata stream; (b) determining whether the syndromes S₀ to S₅ are allzeros; (c) determining that there is no error in the received codewordif the syndromes S₀ to S₅ are all zeros; (d) determining whether thesyndromes S₀, S₁, and S₂ are zeros and at least one of the syndromes S₃,S₄, and S₅ is not zero; (e) determining that error correction isimpossible if the syndromes S₀, S₁, and S₂ are zeros and at least one ofthe calculated the syndromes S₃, S₄, and S₅ is not zero; (f) differentlycalculating coefficients σ1, σ2, and σ3 of an error-location polynomial,depending on whether two of the syndromes S₀, S₁, and S₂ are zeros andthe other is not zero, if all of the syndromes S₀, S₁, and S₂ are notzeros or the syndromes S₃, S₄, and S₅ are all zeros, determining anerror type and the possibility of error correction depending on whethererror locations calculated from the calculated coefficients are in acodeword and calculating error values; and (g) determining an error typeand the possibility of error correction using the syndromes S₀ to S₄ andthe coefficients of the error location polynomial calculated dependingon whether first and second syndrome equations obtained using thesyndromes S₀ to S₃ which are calculated according to the values of thesyndromes S₀ and S₁ are zeros if two of the syndromes S₀ to S₂ are notzeros in the step (f), and calculating error locations and values. 2.The method of claim 1, wherein the step (f) comprises the steps of:(f1)determining whether both of the syndromes S₁ and S₂ are zeros and thesyndrome S₀ is not zero, if the syndromes S₀, S₁, and S₂ are not zerosor if the syndromes S₃, S₄, and S₅ are zeros; (f2) calculating thecoefficients σ1, σ2, and σ3 of the error location polynomial using thefollowing equation if both of the syndromes S₁ and S₂ are zeros andsyndrome S₀ is not zero: ##EQU22## f3) determining whether both of thesyndromes S₀ and S₂ are zeros and the syndrome S₁ is not zero if both ofthe syndromes S₁ and S₂ are not zeros or the syndrome S₀ is zero; (f4)calculating the coefficients, σ₁, σ₂, and σ₃ of the error locationpolynomial using the following equation if both of the syndromes S₀ andS₂ are zeros and the syndrome S₁ is not zero: ##EQU23## (f5) determiningwhether both of the syndromes S₀ and S₁ are zeros and the syndrome S₂ isnot zero if both of the syndromes S₀ and S₂ are not zeros or thesyndrome S₁ is zero; (f6) calculating the coefficients σ1, σ2, and σ3 ofthe error-location polynomial using the following equation if both ofthe syndromes S₀ and S₁ are zeros and the syndrome S₂ is not zero:##EQU24## (f7) assuming that at least three errors are generated afterthe steps (f2), (f4) and (f6); (f8) calculating the error locationsusing the coefficients σ1, σ2, and σ3 calculated in the steps (f2), (f4)and (f6); (f9) determining whether the error locations are in acodeword; (f10) determining that three errors are generated if the errorlocations are in the codeword; (f11) determining that error correctionis impossible if the error locations are not in the codeword; and (f12)performing the step (g) if two of the syndromes S₀, S₁, and S₂ are notzeros.
 3. The method of claim 2, further comprising the step ofcalculating the error values after the step (f10).
 4. The method ofclaim 1, wherein the step (g) comprises the steps of:(g1) determiningwhether the syndrome S₀ is zero and the syndrome S₁ is not zero if twoof the syndromes S₀, S₁, and S₂ are not zeros; (g2) determining whetherthe syndrome S₀ is not zero if the syndrome S₀ is not zero or thesyndrome S₁ is zero: (g3) calculating the first and second syndromeequations A and B using the following equations if the syndrome S₀ isnot zero:

    A=S.sub.2 +σ·S.sub.1

    B=S.sub.3 +σ·S.sub.2

where σ is S₁ /S₀ ; (g4) determining whether both syndrome equations Aand B are not zero; (g5) calculating coefficients σ1' and σ2' of theerror-location polynomial and a value D using the following equation ifboth of the syndrome equations A and B are not zero, or the syndrome S₀is zero and the syndrome S₁ is not zero:

    σ'= (S.sub.1 ·S.sub.2 +S.sub.0 ·S.sub.3)/Δ

    σ2'=(S.sub.1 ·S.sub.3 +S.sub.2.sup.2)/Δ

    D=S.sub.4 +σ1·S.sub.3 +σ2·S.sub.2

where, Δ=S₁ ² +S₀ ·S₂ ≠0; (g6) determining whether both of the syndromeequations A and B are zeros if at least one of the syndrome equations Aand B is zero; error (g7) determining that an error is generated anddetermining an error location and an error value as σ and the syndromeS₀, respectively, if both of the syndrome equations A and B are zeros;(g8) determining that error correction is impossible if either of thesyndrome equations A and B is zero; (g9) determining whether the value Dobtained in the step (g3) is zero; (g10) determining that two errors aregenerated if the value D is zero; (g11) determining that three errorsare generated if the value D is not zero; (g12) calculating coefficientsΣ1, Σ2, and Σ3 of the error-location polynomial using the followingequation:

    Σ1=(S.sub.3 ·σ2'+S.sub.4 ·σ1'+S.sub.5)/D

    Σ2=(S.sub.1 ·S.sub.3 +S.sub.0 ·S.sub.4)/Δ+Σ1·σ1'

    Σ3=(S.sub.1 ·S.sub.4 +S.sub.2 ·S.sub.3)/Δ+Σ1·σ2'

(g13) calculating the error locations from the coefficients ρ1, Σ2, andΣ3; (g14) determining whether the error locations obtained in step (g13)are in the codeword; (g15) determining that three errors are generatedif the error locations are in the codeword; and (g16) performing thestep (g8) if the error locations are not in the codeword.
 5. The errorcorrecting method of claim 2, wherein the step (g) comprises the stepsof:(g1) determining whether the syndrome S₀ is zero and the syndrome S₁is not zero if two of the syndromes S₀, S₁, and S₂ are not zeros; (g2)determining whether the syndrome S₀ is not zero if the syndrome S₀ isnot zero or the syndrome S₁ is zero: (g3) calculating the first andsecond syndrome equations A and B using the following equations if thesyndrome S₀ is not zero:

    A=S.sub.2 +σ·S.sub.1

    B=S.sub.3 +σ·S.sub.2

where σ is S₁ /S₀ ; (g4) determining whether both of the syndromeequations A and B are not zero; (g5) calculating coefficients σ1' andσ2' of the error-location polynomial and a value D using the followingequations if both of the syndrome equations A and B are not zero, or thesyndrome S₀ is zero and the syndrome S₁ is not zero:

    σ1'=(S.sub.1 ·S.sub.2 +S.sub.0 ·S.sub.3)/Δ

    σ2'=(S.sub.1 ·S.sub.3 +S.sub.2.sup.2)/Δ

    D=(S.sub.4 +σ1·S.sub.3 +σ2·S.sub.2

where, Δ=S₁ ² +S₀ ·S₂ ≠0. (g6) determining whether both the syndromeequations A and B are zeros if at least one of the syndrome equations Aand B is zero; (g7) determining that an error is generated anddetermining an error location and an error value as σ and the syndromeS₀, respectively, if both of the syndrome equations A and B are zeros;(g8) determining that error correction is impossible if either of thesyndrome equations A and B is zero; (g9) determining whether the value Dobtained in the step (g3) is zero; (g10) determining that two errors aregenerated if the value D is zero; (g11) determining that three errorsare generated if the value D is not zero; (g12) calculating coefficientsΣ1, Σ2, and Σ3 of the error-location polynomial using the followingequation:

    Σ= (S.sub.3 ·σ2'+S.sub.4 ·σ1'+S.sub.5)/D

    Σ2=(S.sub.1 ·S.sub.3 +S.sub.0 ·S.sub.4)/Δ+Σ1·σ1'

    Σ3=(S.sub.1 ·S.sub.4 +S.sub.2 ·S.sub.3)/Δ+Σ1·σ2';

(g13) calculating the error locations from the coefficients Σ1, Σ2, andΣ3; (g14) determining whether the error locations obtained in step (g13)are in the codeword; (g15) determining that three errors are generatedif the error locations are in the codeword; and (g16) performing thestep (g8) if the error locations are not in the codeword.
 6. The errorcorrecting method as claimed in claim 3, wherein the step (g) comprisesthe steps of:(g1) determining whether the syndrome S₀ is zero and thesyndrome S₁ is not zero if two of the syndromes S₀, S₁, and S₂ are notzeros; (g2) determining whether the syndrome S₀ is not zero if thesyndrome S₀ is not zero or the syndrome S₁ is zero: (g3) calculating thefirst and second syndrome equations A and B using the followingequations if the syndrome S₀ is not zero:

    A=S.sub.2 +σ·S.sub.1

    B=S.sub.3 +σ·S.sub.2

where σ is S₁ /S₀ ; (g4) determining whether both the syndrome equationsA and B are not zero; (g5) calculating coefficients σ1' and σ2' of theerror-location polynomial and a value D using the following equation ifboth the syndrome equations A and B are not zero, or the syndrome S₀ iszero and the syndrome S₁ is not zero:

    σ1'=(S.sub.1 ·S.sub.2 +S.sub.0 ·S.sub.3)/Δ

    σ'= (S.sub.1 ·S.sub.3 +S.sub.2.sup.2)/Δ

    D=S.sub.4 +σ1·S.sub.3 +σ2·S.sub.2

where, Δ=S₁ ² +S₀ ·S₂ ≠0. (g6) determining whether both the syndromeequations A and B are zeros if at least one of the syndrome equations Aand B is zero; (g7) determining that an error is generated anddetermining an error location and an error value as σ and the syndromeS₀, respectively, if both the syndrome A and B are zeros; (g8)determining that error correction is impossible if either of thesyndrome equations A and B is zero; (g9) determining whether the value Dobtained in the step (g3) is zero; (g10) determining that two errors aregenerated if the value D is zero; (g11) determining that three errorsare generated if value D is not zero; (g12) calculating coefficients Σ1,Σ2, and Σ3 of the error-location polynomial using the followingequation:

    Σ1=(S.sub.3 ·σ2'+S.sub.4 ·σ1'+S.sub.5)/D

    Σ2=(S.sub.1 ·S.sub.3 +S.sub.0 ·S.sub.4)/Δ+Σ1·σ1'

    Σ3=(S.sub.1 ·S.sub.4 +S.sub.2 ·S.sub.3)/Δ+Σ1·σ2'

(g13) calculating the error locations from the coefficients Σ1, Σ2, andΣ3; (g14) determining whether the error locations obtained in step (g13)are in the codeword; (g15) determining that three errors are generatedif the error locations are in the codeword; and (g16) performing thestep (g8) if the error locations are not in the codeword.
 7. The errorcorrecting method of claim 4, further comprising the step of calculatingthe error locations and values from the coefficients σ1' and σ2' afterthe step (g10).
 8. The error correcting method of claim 4, furthercomprising the step of obtaining the error values after the step (g15).9. The error correcting method of claim 4, further comprising the stepof determining that error correction is impossible if the syndrome S₀ iszero, in the step (g2).
 10. A method for correcting errors in a digitaldata stream, comprising the steps of:extracting a received codeword fromthe digital data stream; calculating syndromes S₀ to S₅ from thereceived codeword; if the syndromes S₀ to S₅ are all zeros, returning tostep of extracting because there is no error in the received codeword;if the syndromes S₀, S₁, and S₂ are zeros and at least one of thecalculated the syndromes S₃, S₄, and S₅ is not zero, returning to stepof extracting because errors in the received codeword are uncorrectable;selecting a process from among a plurality of processes for determiningcoefficients σ1, σ2, and σ3 of an error-location polynomial wherein theprocess selected depends on which if any of the syndromes S₀, S₁, and S₃are zeros; executing the selected process to determine the coefficientsσ1, σ2, and σ3; and using the coefficients and the syndromes todetermine an error type, whether error correction is possible, and ifpossible error locations and error values for the received codeword. 11.An error correcting device comprising:a codeword storage unit; asyndrome generating unit coupled to the codeword storage unit, whereinthe syndrome generating unit generates syndromes S₀ to S₅ from areceived codeword stored in the codeword storage unit; operation unitthat calculates coefficients σ1, σ2, and σ3 of an error-locationpolynomial as ##EQU25## in response to a first control signal,calculates the coefficients σ1, σ2, and σ3 of the error-locationpolynomial as ##EQU26## in response to a second control signal,calculates the coefficients σ1, σ2, and σ3 of the error-locationpolynomial as ##EQU27## in response to a third control signal,calculates the first and second syndrome equations A and B as

    A=S.sub.2 +σ·S.sub.1

    B=S.sub.3 +σ·S.sub.2

(where σ is S₁ /S₀) in response to a fourth control signal, calculatescoefficients σ1' and σ2' of the error-location polynomial, and D as

    σ'= (S.sub.1 ·S.sub.2 +S.sub.0 ·S.sub.3)/Δ

    σ2'=(S.sub.1 ·S.sub.3 +S.sub.2.sup.2)/Δ

    D=S.sub.4 +σ1·S.sub.3 +σ2·S.sub.2

(where Δ=S₁ ² +S₀ ·S₂ ≠0) in response to a fifth control signal,calculates error locations and values from σ1' and σ2' in response to asixth control signal, calculates coefficients Σ1, Σ2, and Σ3 of anerror-location polynomial as

    Σ= (S.sub.3 ·σ2'+S.sub.4 ·σ1'+S.sub.5)/D

    Σ2=(S.sub.1 ·S.sub.3 +S.sub.0 ·S.sub.4)/Δ+Σ1·σ1'

    Σ3=(S.sub.1 ·S.sub.4 +S.sub.2 ·S.sub.3)/Δ+Σ1·σ2'

in response to a seventh control signal, and calculates error locationsand values from the coefficients Σ1, Σ2, and Σ3; and operationcontroller coupled to the operation unit, wherein the operationcontroller generates the first control signal if both of the syndromesS₁ and S₂ are zeros and the syndrome S₀ is not zero, the second controlsignal if both of the syndromes S₀ and S₂ are zeros and the syndrome S₁is not zero, the third control signal if both of the syndromes S₀ and S₁are zeros and the syndrome S₂ is not zero, the fourth control signal iftwo of the syndromes S₀, S₁, and S₂ are not zeros and if the syndrome S₀is not zero or the syndrome S₁ is zero, the fifth control signal if boththe syndrome equations A and B are not zero, the sixth control signal ifthe value D is zero, and a seventh control signal if the value D is notzero.
 12. The error correcting device of claim 11, further comprising:adetermination controller for determining that no error is generated ifall of the syndromes S₀ to S₅ are zeros, that error correction isimpossible if all of the syndromes S₀, S₁, and S₂ are zeros and not allof the syndromes S₃, S₄, and S₅ are zeros, that three errors aregenerated if the error locations obtained from the coefficients σ1, σ2,and σ3 are in a codeword, that error correction is impossible if theyare not all in the codeword, that an error is generated if both of thesyndrome equations A and B are zeros, that two errors are generated ifthe value D is zero, and that three errors are generated if the value Dis not zero; and means for performing single-error correction,double-error correction, or triple-error correction according to thedetermination result of the determination controlling means.